<tr id="user-<%= user.id %>" class="user">
  <td>
    <div class="user-thumbnail pull-left user-link">
      <%= link_to avatar_image(user, size=40), admin_user_path(user), remote: true %>
    </div>
  </td>
  <td class="user-link">
    <span class="more-important">
      <%= link_to user.name.titleize, admin_user_path(user), remote: true, class: 'user-link' unless user.name.nil? %>
      <%= user_priority(user) %>
      <%= content_tag('span', t("#{user.role}_role"), class: 'label label-default') if user.is_agent? %>
      <%# tag_listing(user.team_list, "user") %>
    </span><br/>
    <span class="less-important last-active"> <%= "#{t('last_seen', default: "Last Seen:")}" %> <%= last_active_time(user.last_sign_in_at) %></span>
  </td>
  <td>
    <span class="label label-count pull-right">
      <%= user.topics.size %>
    </span>
  </td>
  <td class="text-right">
    <div class="btn-group">
      <span id="row-<%= user.id %>" data-toggle="dropdown" aria-expanded="false" class='btn dropdown-toggle fas fa-ellipsis-v'></span>
      <ul class="dropdown-menu dropdown-menu-right" role="menu">
        <li><%= link_to t(:open_new_discussion, default: 'Open Discussion'), new_admin_topic_path(user_id: user.id), remote: true, class: '' if tickets? %></li>
        <li><%= link_to t(:discussions, default: 'Discussions'), admin_user_path(user), remote: true %></li>
        <li><%= link_to t(:edit_user, default: 'Edit User'), edit_admin_user_path(user, mode: 'edit'), remote: false if user.can_be_edited? current_user%></li>
      </ul>
    </div>
  </td>
</tr>
